<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="pagePath" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>审核商品</title>
<link type="text/css" rel="stylesheet" href="${pagePath}/page/static/admin/css/icons.css" />
<link type="text/css" rel="stylesheet" href="${pagePath}/page/static/admin/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="${pagePath}/page/static/admin/css/plugins.css" />
<link type="text/css" rel="stylesheet" href="${pagePath}/page/static/admin/css/main.css" />
</head>
<body>
	<div id="header">
		<div class="container-fluid">
			<div class="navbar">
				<div class="navbar-header">
					<a class="navbar-brand" href="${pagePath}/admin_index.do"><img alt="LOGO" src="${pagePath}/page/static/admin/images/logo.jpg" style="padding-left: 10px;"><span class="text-slogan" style="margin-top: 0px; margin-left: 10px;">校园二手交易后台</span> </a>
				</div>
				<nav class="top-nav" role="navigation">
					<ul class="nav navbar-nav pull-left">
						<li><a href="${pagePath}/admin_index.do"> <img class="user-avatar" src="${pagePath}/page/static/admin/images/admin.png" alt="head img"> ${loguser.username} [${loguser.role}]
						</a></li>
					</ul>
					<ul class="nav navbar-nav pull-right">
						<li><a href="javascript:void(0);"><i class="ec-clock"></i> <span id="time"></span></a></li>
						<li><a href="${pagePath}/index.do"><i class="im-home"></i> 网站首页</a></li>
						<li><a href="${pagePath}/logout.do"><i class="en-logout"></i> 退出登录</a></li>
					</ul>
				</nav>
			</div>
		</div>
	</div>
	<div id="sidebar">
		<div class="sidebar-inner">
			<ul id="sideNav" class="nav nav-pills nav-stacked">
				<li><a href="${pagePath}/admin_index.do">后台首页<i class="im-home"></i></a></li>
				<c:if test="${loguser.role eq '普通学生'}">
					<li><a href="${pagePath}/admin_goods_add.do">发布商品<i class="im-quill"></i></a></li>
					<li><a href="${pagePath}/admin_task_add.do">发布任务<i class="im-paragraph-left"></i></a></li>
					<li><a href="${pagePath}/admin_goods_list.do">商品管理<i class="im-stack"></i></a></li>
					<li><a href="${pagePath}/admin_task_list.do">任务管理<i class="im-stackoverflow"></i></a></li>
					<li><a href="${pagePath}/admin_order_list.do">订单管理<i class="im-stack"></i></a></li>
				</c:if>
				<c:if test="${loguser.role eq '管理员'}">
					<li><a class="active" href="${pagePath}/admin_goods_audit.do">商品审核<i class="im-checkbox-checked"></i></a></li>
					<li><a href="${pagePath}/admin_task_audit.do">任务审核<i class="im-checkmark"></i></a></li>
					<li><a href="${pagePath}/admin_user_list.do">学生管理<i class="im-users"></i></a></li>
				</c:if>
			</ul>
		</div>
	</div>
	<div id="content">
		<div class="content-wrapper">
			<div class="row">
				<div class="col-md-12 heading">
					<h1 class="page-header">
						<i class="im-stack"></i> 审核商品
					</h1>
					<div class="col-md-12">
						<div class="panel panel-default">
							<div class="panel-heading">
								<h4 class="panel-title">商品资料</h4>
							</div>
							<div class="panel-body" style="height: 550px; padding-top: 10px;">
								<div class="bg-white">
									<div class="panel panel-default">
										<div class="col-md-4" align="center">
											<div class="col-md-12">
												<img id="photo" alt="商品图片" src="${pagePath}${goods.picture}" width="200" height="200" style="border: 1px; margin-top: 125px;">
											</div>
										</div>
										<div class="col-md-4">
											<form class="form-horizontal mt20" action="${pagePath}/admin_goods_audit_result.do" method="post" role="form">
												<div class="form-group">
													<h2 align="center">审核商品</h2>
												</div>
												<input type="hidden" name="goods_id" value="${goods.id}">
												<div class="seperator" style="margin-bottom: -10px;">
													<span style="color: red; font-size: 16px;">${message}</span>
												</div>
												<div class="form-group">
													<div class="col-md-12">
														<c:forEach items="${types}" var="type">
															<c:choose>
																<c:when test="${goods.typeId eq type.id}">
																	<input type="text" class="form-control left-icon" value="${type.name}" readonly="readonly">
																	<i class="ec-list s16 left-input-icon"></i>
																</c:when>
															</c:choose>
														</c:forEach>
													</div>
												</div>
												<div class="form-group">
													<div class="col-md-12">
														<input type="text" class="form-control left-icon" value="${goods.name}" readonly="readonly"> <i class="br-atom s16 left-input-icon"></i>
													</div>
												</div>
												<div class="form-group">
													<div class="col-md-12">
														<input type="text" class="form-control left-icon" value="${goods.price}" readonly="readonly"> <i class="fa-money s16 left-input-icon"></i>
													</div>
												</div>
												<div class="form-group">
													<div class="col-md-12">
														<textarea class="form-control left-icon" readonly="readonly" rows="5">${goods.description}</textarea>
														<i class="ec-pencil s16 left-input-icon"></i>
													</div>
												</div>
												<div class="form-group">
													<div class="col-md-12">
														<label>审核结果：</label> <label><input type="radio" name="result" class=" left-icon" value="审核通过" required="required">审核通过 </label><label><input type="radio" name="result" class=" left-icon" value="审核驳回" required="required">审核驳回</label>
													</div>
												</div>
												<div class="form-group">
													<div class="col-md-12">
														<button type="submit" class="btn btn-success btn-block">保存</button>
													</div>
												</div>
											</form>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="${pagePath}/page/static/admin/js/pace.min.js"></script>
	<script type="text/javascript" src="${pagePath}/page/static/admin/js/jquery.min.js"></script>
	<script type="text/javascript" src="${pagePath}/page/static/admin/js/bootstrap.js"></script>
	<script type="text/javascript" src="${pagePath}/page/static/admin/js/time.js"></script>
</body>
</html>